<template>
  <Dialog :title="dialogTitle" v-model="dialogVisible"  width="1200px">
    <el-form
      ref="formRef"
      :model="formData"
      :rules="formRules"
      label-width="auto"
      v-loading="formLoading"

    >
      <el-form-item :label="t('formItems.parentId')" prop="parentId" >
        <el-input v-model="formData.parentId" :placeholder="t('formItems.placeholderparentId')" disabled/>
      </el-form-item>

      <el-form-item :label="t('formItems.wellCode')" prop="wellCode">
        <el-input v-model="formData.wellCode" :placeholder="t('formItems.placeholderWellCode')" />
      </el-form-item>

      <el-form-item :label="t('formItems.deviceCode')" prop="deviceCode">
        <el-input v-model="formData.deviceCode" :placeholder="t('formItems.placeholderDeviceCode')" />
      </el-form-item>

      <el-row :gutter="48">
        <!--1-->
        <el-col :span="6">
          <el-form-item :label="t('formItems.date')" prop="p1">
            <el-date-picker
              v-model="formData.p1"
              type="date"
              value-format="YYYY-MM-DD"
              :placeholder="t('formItems.placeholderDate')"
            />
          </el-form-item>
          <el-form-item :label="t('formItems.time')" prop="p2">
            <el-time-picker
              v-model="formData.p2"
              value-format="HH:mm:ss"
              :placeholder="t('formItems.placeholderTime')"
            />
          </el-form-item>
          <el-form-item :label="t('formItems.flag')" prop="p3">
            <el-input v-model="formData.p3" :placeholder="t('formItems.placeholderFlag')" />
          </el-form-item>
          <el-form-item :label="t('formItems.wellName')" prop="p4">
            <el-input v-model="formData.p4" :placeholder="t('formItems.placeholderWellName')" />
          </el-form-item>
          <el-form-item :label="t('formItems.wellDepth')" prop="p5">
            <el-input v-model="formData.p5" :placeholder="t('formItems.placeholderWellDepth')" />
          </el-form-item>
          <el-form-item :label="t('formItems.mudLateWellDepth')" prop="p6">
            <el-input v-model="formData.p6" :placeholder="t('formItems.placeholderMudLateWellDepth')" />
          </el-form-item>
          <el-form-item :label="t('formItems.hookHeight')" prop="p7">
            <el-input v-model="formData.p7" :placeholder="t('formItems.placeholderHookHeight')" />
          </el-form-item>
          <el-form-item :label="t('formItems.downTime')" prop="p8">
            <el-input v-model="formData.p8" :placeholder="t('formItems.placeholderDownTime')" />
          </el-form-item>
          <el-form-item :label="t('formItems.actualLateTime')" prop="p9">
            <el-input v-model="formData.p9" :placeholder="t('formItems.placeholderActualLateTime')" />
          </el-form-item>
          <el-form-item :label="t('formItems.upMeterDrillingTime')" prop="p10">
            <el-input v-model="formData.p10" :placeholder="t('formItems.placeholderUpMeterDrillingTime')" />
          </el-form-item>
          <el-form-item :label="t('formItems.progress')" prop="p11">
            <el-input v-model="formData.p11" :placeholder="t('formItems.progressPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.hookLoad')" prop="p12">
            <el-input v-model="formData.p12" :placeholder="t('formItems.hookLoadPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.drillingPressure')" prop="p13">
            <el-input v-model="formData.p13" :placeholder="t('formItems.drillingPressurePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.rotarySpeed')" prop="p14">
            <el-input v-model="formData.p14" :placeholder="t('formItems.rotarySpeedPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.torque')" prop="p15">
            <el-input v-model="formData.p15" :placeholder="t('formItems.torquePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.tongsTorque')" prop="p16">
            <el-input v-model="formData.p16" :placeholder="t('formItems.tongsTorquePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.verticalPressure')" prop="p17">
            <el-input v-model="formData.p17" :placeholder="t('formItems.verticalPressurePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.casingPressure')" prop="p18">
            <el-input v-model="formData.p18" :placeholder="t('formItems.casingPressurePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.pumpSurge1')" prop="p19">
            <el-input v-model="formData.p19" :placeholder="t('formItems.pumpSurge1Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.pumpSurge2')" prop="p20">
            <el-input v-model="formData.p20" :placeholder="t('formItems.pumpSurge2Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.pumpSurge3')" prop="p21">
            <el-input v-model="formData.p21" :placeholder="t('formItems.pumpSurge3Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.inflow')" prop="p22">
            <el-input v-model="formData.p22" :placeholder="t('formItems.inflowPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.outflow')" prop="p23">
            <el-input v-model="formData.p23" :placeholder="t('formItems.outflowPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.inDensity')" prop="p24">
            <el-input v-model="formData.p24" :placeholder="t('formItems.inDensityPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.outDensity')" prop="p25">
            <el-input v-model="formData.p25" :placeholder="t('formItems.outDensityPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.inTemperature')" prop="p26">
            <el-input v-model="formData.p26" :placeholder="t('formItems.inTemperaturePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.outTemperature')" prop="p27">
            <el-input v-model="formData.p27" :placeholder="t('formItems.outTemperaturePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.inConductivity')" prop="p28">
            <el-input v-model="formData.p28" :placeholder="t('formItems.inConductivityPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.outConductivity')" prop="p29">
            <el-input v-model="formData.p29" :placeholder="t('formItems.outConductivityPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.poolVolume1')" prop="p30">
            <el-input v-model="formData.p30" :placeholder="t('formItems.poolVolume1Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.poolVolume2')" prop="p31">
            <el-input v-model="formData.p31" :placeholder="t('formItems.poolVolume2Placeholder')" />
          </el-form-item>

        </el-col>
        <!--2-->
        <el-col :span="6">
          <el-form-item :label="t('formItems.poolVolume3')" prop="p32">
            <el-input v-model="formData.p32" :placeholder="t('formItems.poolVolume3Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.poolVolume4')" prop="p33">
            <el-input v-model="formData.p33" :placeholder="t('formItems.poolVolume4Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.poolVolume5')" prop="p34">
            <el-input v-model="formData.p34" :placeholder="t('formItems.poolVolume5Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.poolVolume6')" prop="p35">
            <el-input v-model="formData.p35" :placeholder="t('formItems.poolVolume6Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.liftingDrillingCylinder')" prop="p36">
            <el-input v-model="formData.p36" :placeholder="t('formItems.liftingDrillingCylinderPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.totalPool')" prop="p37">
            <el-input v-model="formData.p37" :placeholder="t('formItems.totalPoolPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.poolOverflowLeakage')" prop="p38">
            <el-input v-model="formData.p38" :placeholder="t('formItems.poolOverflowLeakagePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.totalHydrocarbons')" prop="p39">
            <el-input v-model="formData.p39" :placeholder="t('formItems.totalHydrocarbonsPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.c1')" prop="p40">
            <el-input v-model="formData.p40" :placeholder="t('formItems.c1Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.c2')" prop="p41">
            <el-input v-model="formData.p41" :placeholder="t('formItems.c2Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.c3')" prop="p42">
            <el-input v-model="formData.p42" :placeholder="t('formItems.c3Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.ic4')" prop="p43">
            <el-input v-model="formData.p43" :placeholder="t('formItems.ic4Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.nc4')" prop="p44">
            <el-input v-model="formData.p44" :placeholder="t('formItems.nc4Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.ic5')" prop="p45">
            <el-input v-model="formData.p45" :placeholder="t('formItems.ic5Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.nc5')" prop="p46">
            <el-input v-model="formData.p46" :placeholder="t('formItems.nc5Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.h2')" prop="p47">
            <el-input v-model="formData.p47" :placeholder="t('formItems.h2Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.co2')" prop="p48">
            <el-input v-model="formData.p48" :placeholder="t('formItems.co2Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.he')" prop="p49">
            <el-input v-model="formData.p49" :placeholder="t('formItems.hePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.dc')" prop="p50">
            <el-input v-model="formData.p50" :placeholder="t('formItems.dcPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.sigma')" prop="p51">
            <el-input v-model="formData.p51" :placeholder="t('formItems.sigmaPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.equivalentDensity')" prop="p52">
            <el-input v-model="formData.p52" :placeholder="t('formItems.equivalentDensityPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.pureDrillingTime')" prop="p53">
            <el-input v-model="formData.p53" :placeholder="t('formItems.pureDrillingTimePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.cost')" prop="p54">
            <el-input v-model="formData.p54" :placeholder="t('formItems.costPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.wellBottomVoid')" prop="p55">
            <el-input v-model="formData.p55" :placeholder="t('formItems.wellBottomVoidPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.squareEntry')" prop="p56">
            <el-input v-model="formData.p56" :placeholder="t('formItems.squareEntryPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.squareRemainder')" prop="p57">
            <el-input v-model="formData.p57" :placeholder="t('formItems.squareRemainderPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.drillStringLength')" prop="p58">
            <el-input v-model="formData.p58" :placeholder="t('formItems.drillStringLengthPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.drillStringApparentWeight')" prop="p59">
            <el-input v-model="formData.p59" :placeholder="t('formItems.drillStringApparentWeightPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.currentDrillPipe')" prop="p60">
            <el-input v-model="formData.p60" :placeholder="t('formItems.currentDrillPipePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.currentStandPipe')" prop="p61">
            <el-input v-model="formData.p61" :placeholder="t('formItems.currentStandPipePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.winchCount')" prop="p62">
            <el-input v-model="formData.p62" :placeholder="t('formItems.winchCountPlaceholder')" />
          </el-form-item>
        </el-col>
        <!--3-->
        <el-col :span="6">
          <el-form-item :label="t('formItems.totalPumpSurge')" prop="p63">
            <el-input v-model="formData.p63" :placeholder="t('formItems.totalPumpSurgePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.totalRotations')" prop="p64">
            <el-input v-model="formData.p64" :placeholder="t('formItems.totalRotationsPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.infraredCO2')" prop="p65">
            <el-input v-model="formData.p65" :placeholder="t('formItems.infraredCO2Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.h2S1')" prop="p66">
            <el-input v-model="formData.p66" :placeholder="t('formItems.h2S1Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.h2S2')" prop="p67">
            <el-input v-model="formData.p67" :placeholder="t('formItems.h2S2Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.h2S3')" prop="p68">
            <el-input v-model="formData.p68" :placeholder="t('formItems.h2S3Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.h2S4')" prop="p69">
            <el-input v-model="formData.p69" :placeholder="t('formItems.h2S4Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.h2S5')" prop="p70">
            <el-input v-model="formData.p70" :placeholder="t('formItems.h2S5Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.seaSurfaceWaveHeight')" prop="p71">
            <el-input v-model="formData.p71" :placeholder="t('formItems.seaSurfaceWaveHeightPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.drillingStatus')" prop="p72">
            <el-input v-model="formData.p72" :placeholder="t('formItems.drillingStatusPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.poolVolume7')" prop="p73">
            <el-input v-model="formData.p73" :placeholder="t('formItems.poolVolume7Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.poolVolume8')" prop="p74">
            <el-input v-model="formData.p74" :placeholder="t('formItems.poolVolume8Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.poolVolume9')" prop="p75">
            <el-input v-model="formData.p75" :placeholder="t('formItems.poolVolume9Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.poolVolume10')" prop="p76">
            <el-input v-model="formData.p76" :placeholder="t('formItems.poolVolume10Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.poolVolume11')" prop="p77">
            <el-input v-model="formData.p77" :placeholder="t('formItems.poolVolume11Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.poolVolume12')" prop="p78">
            <el-input v-model="formData.p78" :placeholder="t('formItems.poolVolume12Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.trueVerticalDepth')" prop="p79">
            <el-input v-model="formData.p79" :placeholder="t('formItems.trueVerticalDepthPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.trueAzimuth')" prop="p80">
            <el-input v-model="formData.p80" :placeholder="t('formItems.trueAzimuthPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.angleOfInclination')" prop="p81">
            <el-input v-model="formData.p81" :placeholder="t('formItems.angleOfInclinationPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.azimuthAtDrillingPosition')" prop="p82">
            <el-input v-model="formData.p82" :placeholder="t('formItems.azimuthAtDrillingPositionPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.azimuth')" prop="p83">
            <el-input v-model="formData.p83" :placeholder="t('formItems.azimuthPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.azimuthAtDrillingPositionAzimuth')" prop="p84">
            <el-input v-model="formData.p84" :placeholder="t('formItems.azimuthAtDrillingPositionAzimuthPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.horizontalDisplacement')" prop="p85">
            <el-input v-model="formData.p85" :placeholder="t('formItems.horizontalDisplacementPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.closedAzimuth')" prop="p86">
            <el-input v-model="formData.p86" :placeholder="t('formItems.closedAzimuthPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.bitNumber')" prop="p87">
            <el-input v-model="formData.p87" :placeholder="t('formItems.bitNumberPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.bitType')" prop="p88">
            <el-input v-model="formData.p88" :placeholder="t('formItems.bitTypePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.bitSize')" prop="p89">
            <el-input v-model="formData.p89" :placeholder="t('formItems.bitSizePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.bitCost')" prop="p90">
            <el-input v-model="formData.p90" :placeholder="t('formItems.bitCostPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.bitIADC')" prop="p91">
            <el-input v-model="formData.p91" :placeholder="t('formItems.bitIADCPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.waterEye1')" prop="p92">
            <el-input v-model="formData.p92" :placeholder="t('formItems.waterEye1Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.waterEye2')" prop="p93">
            <el-input v-model="formData.p93" :placeholder="t('formItems.waterEye2Placeholder')" />
          </el-form-item>
        </el-col>
        <!--4-->
        <el-col :span="6">
          <el-form-item :label="t('formItems.waterEye3')" prop="p94">
            <el-input v-model="formData.p94" :placeholder="t('formItems.waterEye3Placeholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.bitArea')" prop="p95">
            <el-input v-model="formData.p95" :placeholder="t('formItems.bitAreaPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.bearingCoefficient')" prop="p96">
            <el-input v-model="formData.p96" :placeholder="t('formItems.bearingCoefficientPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.bitPosition')" prop="p97">
            <el-input v-model="formData.p97" :placeholder="t('formItems.bitPositionPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.toothGrinding')" prop="p98">
            <el-input v-model="formData.p98" :placeholder="t('formItems.toothGrindingPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.shaftGrinding')" prop="p99">
            <el-input v-model="formData.p99" :placeholder="t('formItems.shaftGrindingPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.gasInletFlow')" prop="p100">
            <el-input v-model="formData.p100" :placeholder="t('formItems.gasInletFlowPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.gasOutletFlow')" prop="p101">
            <el-input v-model="formData.p101" :placeholder="t('formItems.gasOutletFlowPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.gasInletTemperature')" prop="p102">
            <el-input v-model="formData.p102" :placeholder="t('formItems.gasInletTemperaturePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.gasOutletTemperature')" prop="p103">
            <el-input v-model="formData.p103" :placeholder="t('formItems.gasOutletTemperaturePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.gasInletPressure')" prop="p104">
            <el-input v-model="formData.p104" :placeholder="t('formItems.gasInletPressurePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.gasOutletPressure')" prop="p105">
            <el-input v-model="formData.p105" :placeholder="t('formItems.gasOutletPressurePlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.gasOutletHumidity')" prop="p106">
            <el-input v-model="formData.p106" :placeholder="t('formItems.gasOutletHumidityPlaceholder')" />
          </el-form-item>
          <el-form-item :label="t('formItems.annularPressureDrop')" prop="p107">
            <el-input v-model="formData.p107" :placeholder="t('formItems.placeholderAnnularPressureDrop')" />
          </el-form-item>
          <el-form-item :label="t('formItems.drillStringPressureDrop')" prop="p108">
            <el-input v-model="formData.p108" :placeholder="t('formItems.placeholderDrillStringPressureDrop')" />
          </el-form-item>
          <el-form-item :label="t('formItems.bitPressureDrop')" prop="p109">
            <el-input v-model="formData.p109" :placeholder="t('formItems.placeholderBitPressureDrop')" />
          </el-form-item>
          <el-form-item :label="t('formItems.surfacePressureLoss')" prop="p110">
            <el-input v-model="formData.p110" :placeholder="t('formItems.placeholderSurfacePressureLoss')" />
          </el-form-item>
          <el-form-item :label="t('formItems.hydraulicHorsepower')" prop="p111">
            <el-input v-model="formData.p111" :placeholder="t('formItems.placeholderHydraulicHorsepower')" />
          </el-form-item>
          <el-form-item :label="t('formItems.impactForce')" prop="p112">
            <el-input v-model="formData.p112" :placeholder="t('formItems.placeholderImpactForce')" />
          </el-form-item>
          <el-form-item :label="t('formItems.jetVelocity')" prop="p113">
            <el-input v-model="formData.p113" :placeholder="t('formItems.placeholderJetVelocity')" />
          </el-form-item>
          <el-form-item :label="t('formItems.hydraulicEfficiency')" prop="p114">
            <el-input v-model="formData.p114" :placeholder="t('formItems.placeholderHydraulicEfficiency')" />
          </el-form-item>
          <el-form-item :label="t('formItems.auxiliaryAgentInletFlow')" prop="p115">
            <el-input v-model="formData.p115" :placeholder="t('formItems.placeholderAuxiliaryAgentInletFlow')" />
          </el-form-item>
          <el-form-item :label="t('formItems.gasOutletCarbonMonoxide')" prop="p116">
            <el-input v-model="formData.p116" :placeholder="t('formItems.placeholderGasOutletCarbonMonoxide')" />
          </el-form-item>
          <el-form-item :label="t('formItems.gasFlow')" prop="p117">
            <el-input v-model="formData.p117" :placeholder="t('formItems.placeholderGasFlow')" />
          </el-form-item>
          <el-form-item :label="t('formItems.gasLateWellDepth')" prop="p118">
            <el-input v-model="formData.p118" :placeholder="t('formItems.placeholderGasLateWellDepth')" />
          </el-form-item>
          <el-form-item :label="t('formItems.cuttingsLateWellDepth')" prop="p119">
            <el-input v-model="formData.p119" :placeholder="t('formItems.placeholderCutttingsLateWellDepth')" />
          </el-form-item>
          <el-form-item :label="t('formItems.language')" prop="p120">
            <el-input v-model="formData.p120" :placeholder="t('formItems.placeholderLanguage')" />
          </el-form-item>
          <!--          <el-form-item label="参数121" prop="p121">
                      <el-input v-model="formData.p121" placeholder="请输入参数121" />
                    </el-form-item>
                    <el-form-item label="参数122" prop="p122">
                      <el-input v-model="formData.p122" placeholder="请输入参数122" />
                    </el-form-item>
                    <el-form-item label="参数123" prop="p123">
                      <el-input v-model="formData.p123" placeholder="请输入参数123" />
                    </el-form-item>
                    <el-form-item label="参数124" prop="p124">
                      <el-input v-model="formData.p124" placeholder="请输入参数124" />
                    </el-form-item>-->
        </el-col>
      </el-row>



      <el-form-item :label="t('formData.remark')" prop="remark">
        <el-input
          v-model="formData.remark"
          type="textarea"
          :rows="4"
          :placeholder="t('formData.remarkInfo')"
        />
      </el-form-item>
    </el-form>
    <template #footer>
      <el-button @click="submitForm" type="primary" :disabled="formLoading">
        {{ t('action.confirm') }}
      </el-button>
      <el-button @click="dialogVisible = false">
        {{ t('action.cancel') }}
      </el-button>
    </template>
  </Dialog>
</template>
<script setup lang="ts">
import { RtMaintainApi } from '@/api/base/rtmaintain'

/**  表单 */
defineOptions({ name: 'RtMaintainChildForm' })

const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗

const dialogVisible = ref(false) // 弹窗的是否展示
const dialogTitle = ref('') // 弹窗的标题
const formLoading = ref(false) // 表单的加载中：1）修改时的数据加载；2）提交的按钮禁用
const formType = ref('') // 表单的类型：create - 新增；update - 修改
const formData = ref({
  id: undefined,
  parentId: undefined,
  wellCode: undefined,
  deviceCode: undefined,
  p1: undefined,
  p2: undefined,
  p3: undefined,
  p4: undefined,
  p5: undefined,
  p6: undefined,
  p7: undefined,
  p8: undefined,
  p9: undefined,
  p10: undefined,
  p11: undefined,
  p12: undefined,
  p13: undefined,
  p14: undefined,
  p15: undefined,
  p16: undefined,
  p17: undefined,
  p18: undefined,
  p19: undefined,
  p20: undefined,
  p21: undefined,
  p22: undefined,
  p23: undefined,
  p24: undefined,
  p25: undefined,
  p26: undefined,
  p27: undefined,
  p28: undefined,
  p29: undefined,
  p30: undefined,
  p31: undefined,
  p32: undefined,
  p33: undefined,
  p34: undefined,
  p35: undefined,
  p36: undefined,
  p37: undefined,
  p38: undefined,
  p39: undefined,
  p40: undefined,
  p41: undefined,
  p42: undefined,
  p43: undefined,
  p44: undefined,
  p45: undefined,
  p46: undefined,
  p47: undefined,
  p48: undefined,
  p49: undefined,
  p50: undefined,
  p51: undefined,
  p52: undefined,
  p53: undefined,
  p54: undefined,
  p55: undefined,
  p56: undefined,
  p57: undefined,
  p58: undefined,
  p59: undefined,
  p60: undefined,
  p61: undefined,
  p62: undefined,
  p63: undefined,
  p64: undefined,
  p65: undefined,
  p66: undefined,
  p67: undefined,
  p68: undefined,
  p69: undefined,
  p70: undefined,
  p71: undefined,
  p72: undefined,
  p73: undefined,
  p74: undefined,
  p75: undefined,
  p76: undefined,
  p77: undefined,
  p78: undefined,
  p79: undefined,
  p80: undefined,
  p81: undefined,
  p82: undefined,
  p83: undefined,
  p84: undefined,
  p85: undefined,
  p86: undefined,
  p87: undefined,
  p88: undefined,
  p89: undefined,
  p90: undefined,
  p91: undefined,
  p92: undefined,
  p93: undefined,
  p94: undefined,
  p95: undefined,
  p96: undefined,
  p97: undefined,
  p98: undefined,
  p99: undefined,
  p100: undefined,
  p101: undefined,
  p102: undefined,
  p103: undefined,
  p104: undefined,
  p105: undefined,
  p106: undefined,
  p107: undefined,
  p108: undefined,
  p109: undefined,
  p110: undefined,
  p111: undefined,
  p112: undefined,
  p113: undefined,
  p114: undefined,
  p115: undefined,
  p116: undefined,
  p117: undefined,
  p118: undefined,
  p119: undefined,
  p120: undefined,
  p121: undefined,
  p122: undefined,
  p123: undefined,
  p124: undefined,
  p125: undefined,
  p126: undefined,
  p127: undefined,
  p128: undefined,
  p129: undefined,
  p130: undefined,
  p131: undefined,
  p132: undefined,
  p133: undefined,
  p134: undefined,
  p135: undefined,
  p136: undefined,
  p137: undefined,
  p138: undefined,
  p139: undefined,
  p140: undefined,
  p141: undefined,
  p142: undefined,
  p143: undefined,
  p144: undefined,
  p145: undefined,
  p146: undefined,
  p147: undefined,
  p148: undefined,
  p149: undefined,
  p150: undefined,
  p151: undefined,
  p152: undefined,
  p153: undefined,
  p154: undefined,
  p155: undefined,
  p156: undefined,
  p157: undefined,
  p158: undefined,
  p159: undefined,
  p160: undefined,
  remark: undefined,
})
const formRules = reactive({
  parentId: [{ required: true, message: '父表ID不能为空', trigger: 'blur' }],
})
const formRef = ref() // 表单 Ref

/** 打开弹窗 */
const open = async (type: string, id?: number) => {
  dialogVisible.value = true
  dialogTitle.value = t('action.' + type)
  formType.value = type
  resetForm()
  // 修改时，设置数据
  if (id) {
    formLoading.value = true
    try {
      formData.value = await RtMaintainApi.getRtMaintainChildByParentId(id)
    } finally {
      formLoading.value = false
    }
  }
}
defineExpose({ open }) // 提供 open 方法，用于打开弹窗

/** 提交表单 */
const emit = defineEmits(['success']) // 定义 success 事件，用于操作成功后的回调
const submitForm = async () => {
  // 校验表单
  await formRef.value.validate()
  // 提交请求
  formLoading.value = true
  try {
    const data = formData.value as unknown as RtMaintainChildVO
    await RtMaintainApi.updateRtMaintainChild(data)
    message.success(t('common.updateSuccess'))
    dialogVisible.value = false
    // 发送操作成功的事件
    emit('success')
  } finally {
    formLoading.value = false
  }
}

/** 重置表单 */
const resetForm = () => {
  formData.value = {
    id: undefined,
    parentId: undefined,
    wellCode: undefined,
    deviceCode: undefined,
    p1: undefined,
    p2: undefined,
    p3: undefined,
    p4: undefined,
    p5: undefined,
    p6: undefined,
    p7: undefined,
    p8: undefined,
    p9: undefined,
    p10: undefined,
    p11: undefined,
    p12: undefined,
    p13: undefined,
    p14: undefined,
    p15: undefined,
    p16: undefined,
    p17: undefined,
    p18: undefined,
    p19: undefined,
    p20: undefined,
    p21: undefined,
    p22: undefined,
    p23: undefined,
    p24: undefined,
    p25: undefined,
    p26: undefined,
    p27: undefined,
    p28: undefined,
    p29: undefined,
    p30: undefined,
    p31: undefined,
    p32: undefined,
    p33: undefined,
    p34: undefined,
    p35: undefined,
    p36: undefined,
    p37: undefined,
    p38: undefined,
    p39: undefined,
    p40: undefined,
    p41: undefined,
    p42: undefined,
    p43: undefined,
    p44: undefined,
    p45: undefined,
    p46: undefined,
    p47: undefined,
    p48: undefined,
    p49: undefined,
    p50: undefined,
    p51: undefined,
    p52: undefined,
    p53: undefined,
    p54: undefined,
    p55: undefined,
    p56: undefined,
    p57: undefined,
    p58: undefined,
    p59: undefined,
    p60: undefined,
    p61: undefined,
    p62: undefined,
    p63: undefined,
    p64: undefined,
    p65: undefined,
    p66: undefined,
    p67: undefined,
    p68: undefined,
    p69: undefined,
    p70: undefined,
    p71: undefined,
    p72: undefined,
    p73: undefined,
    p74: undefined,
    p75: undefined,
    p76: undefined,
    p77: undefined,
    p78: undefined,
    p79: undefined,
    p80: undefined,
    p81: undefined,
    p82: undefined,
    p83: undefined,
    p84: undefined,
    p85: undefined,
    p86: undefined,
    p87: undefined,
    p88: undefined,
    p89: undefined,
    p90: undefined,
    p91: undefined,
    p92: undefined,
    p93: undefined,
    p94: undefined,
    p95: undefined,
    p96: undefined,
    p97: undefined,
    p98: undefined,
    p99: undefined,
    p100: undefined,
    p101: undefined,
    p102: undefined,
    p103: undefined,
    p104: undefined,
    p105: undefined,
    p106: undefined,
    p107: undefined,
    p108: undefined,
    p109: undefined,
    p110: undefined,
    p111: undefined,
    p112: undefined,
    p113: undefined,
    p114: undefined,
    p115: undefined,
    p116: undefined,
    p117: undefined,
    p118: undefined,
    p119: undefined,
    p120: undefined,
    p121: undefined,
    p122: undefined,
    p123: undefined,
    p124: undefined,
    p125: undefined,
    p126: undefined,
    p127: undefined,
    p128: undefined,
    p129: undefined,
    p130: undefined,
    p131: undefined,
    p132: undefined,
    p133: undefined,
    p134: undefined,
    p135: undefined,
    p136: undefined,
    p137: undefined,
    p138: undefined,
    p139: undefined,
    p140: undefined,
    p141: undefined,
    p142: undefined,
    p143: undefined,
    p144: undefined,
    p145: undefined,
    p146: undefined,
    p147: undefined,
    p148: undefined,
    p149: undefined,
    p150: undefined,
    p151: undefined,
    p152: undefined,
    p153: undefined,
    p154: undefined,
    p155: undefined,
    p156: undefined,
    p157: undefined,
    p158: undefined,
    p159: undefined,
    p160: undefined,
    remark: undefined,
  }
  formRef.value?.resetFields()
}




</script>
